package com.charger.PromoteOperations.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 
 * @TableName group_rule
 */
@TableName(value ="group_rule")
public class GroupRule implements Serializable {
    /**
     * 组团规则中间表主键
     */
    @TableId(type = IdType.AUTO)
    private Long groupruleId;

    /**
     * 组团表主键
     */
    private Long groupId;

    /**
     * 规则表主键
     */
    private Long ruleId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 组团规则中间表主键
     */
    public Long getGroupruleId() {
        return groupruleId;
    }

    /**
     * 组团规则中间表主键
     */
    public void setGroupruleId(Long groupruleId) {
        this.groupruleId = groupruleId;
    }

    /**
     * 组团表主键
     */
    public Long getGroupId() {
        return groupId;
    }

    /**
     * 组团表主键
     */
    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    /**
     * 规则表主键
     */
    public Long getRuleId() {
        return ruleId;
    }

    /**
     * 规则表主键
     */
    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        GroupRule other = (GroupRule) that;
        return (this.getGroupruleId() == null ? other.getGroupruleId() == null : this.getGroupruleId().equals(other.getGroupruleId()))
            && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
            && (this.getRuleId() == null ? other.getRuleId() == null : this.getRuleId().equals(other.getRuleId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGroupruleId() == null) ? 0 : getGroupruleId().hashCode());
        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
        result = prime * result + ((getRuleId() == null) ? 0 : getRuleId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", groupruleId=").append(groupruleId);
        sb.append(", groupId=").append(groupId);
        sb.append(", ruleId=").append(ruleId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}